import { request } from "@ruifox-cms/utils";
//查询用户
export function pagingUser(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/paging",
    method: "post",
    transformRequest: [(data) => {
      return JSON.stringify(data);
    }],
    headers: {
      'Content-Type': 'application/json' // 确保请求头正确设置
    },
    data,
  });
}
//保存用户 新增和修改都调这个 
export function saveUserUser(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/saveUser",
    method: "post",
    data,
  });
}
//检验人脸
export function facialIdentificationUser(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/user/facialIdentification",
    method: "post",
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data,
  });
}
//获取用户信息 （不脱敏）
export function getUserInfoWithoutDesensitize(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/getUserInfoWithoutDesensitize",
    method: "post",
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data,
  });
}
//用户调用人脸识别
export function facialIdentificationByUser(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/facialIdentificationByUser",
    method: "post",
    data,
  });
}
//后台调用人脸识别
export function facialIdentificationByBackend(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/facialIdentificationByBackend",
    method: "post",
    data,
  });
}
//获取用户真实姓名
export function getUserRealName(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/getUserRealName",
    method: "get",
    params,
  });
}
//获取用户信息 
export function getUserInfo(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/getUserInfo",
    method: "get",
    params,
  });
}
//获取用户身份证号码
export function getUserIdentificationNumber(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/user/getUserIdentificationNumber",
    method: "get",
    params,
  });
}